package com.tangcco.lockwell.service;

import com.github.pagehelper.PageInfo;
import com.tangcco.lockwell.domain.ExamPaper;
import com.tangcco.lockwell.domain.Question;
import com.tangcco.lockwell.domain.User;
import com.tangcco.lockwell.viewmodel.admin.exam.*;

import com.tangcco.lockwell.viewmodel.admin.question.QuestionEditRequestVM;
import com.tangcco.lockwell.viewmodel.student.dashboard.PaperFilter;
import com.tangcco.lockwell.viewmodel.student.dashboard.PaperInfo;

import java.text.ParseException;
import java.util.List;

public interface ExamPaperService extends BaseService<ExamPaper> {
    ExamPaper savePaperFromVM(ExamPaperEditRequestVM examPaperEditRequestVM, User user);
    public EPaperEditRequestVM examPaperToVM(Integer id) throws ParseException;
    public PageInfo<ExamPaper> page(ExamPaperPageRequestVM requestVM);
    public List<PaperInfo> indexPaper(PaperFilter paperFilter);
    public Integer selectAllCount();
    QuestionEditRequestVM getQuestionEditRequestVM(Question question);

    /**
     * 按条件查询试卷列表
     * @param examPaper
     * @return
     */
    List<ExamPaper> selectList(ExamPaper examPaper);

    ExamPaper getExamPaperById(Integer id);

    public PageInfo<ExamPaperVM> pagevm(ExamPaperPageRequestVM requestVM);

    public int deletePaper(ExamPaper examPaper);
    //试卷总数
    long getExamPaperCount();

    ExamPaperEditRequestVM ExamPaperAddAi(ExampaperAddAIVM exampaperAddAIVM);

}
